package com.smart.community.feign.health;

import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import com.smart.community.feign.health.fallback.HealthCheckFeignFallbackFactory;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

/**
 * 服务健康检查Feign接口
 * 
 * 提供统一的服务健康检查功能
 * 用于监控服务可用性和自动恢复
 * 
 * @author Wu.Liang
 * @version 2.0.0
 * @since 2025-08-28
 */
@Tag(name = "服务健康检查Feign接口", description = "服务健康检查相关Feign接口")
@FeignClient(
    name = "smart-community-parking",
    path = "/feign/health",
    fallbackFactory = HealthCheckFeignFallbackFactory.class,
    contextId = "healthCheckFeign"
)
public interface IHealthCheckFeign {
    
    /**
     * 检查服务健康状态
     * 
     * @return 健康状态
     */
    @Operation(summary = "检查服务健康状态")
    @GetMapping("/check")
    Boolean checkHealth();
    
    /**
     * 获取服务详细信息
     * 
     * @return 服务详细信息
     */
    @Operation(summary = "获取服务详细信息")
    @GetMapping("/info")
    Map<String, Object> getServiceInfo();
}
